package com.banyuan.HomeWork.interfacedemo;

public class PolyDemo {
    public static void main(String[] args) {
        Rectangle r = new Rectangle("绿色", 5, 4);
        Circle c = new Circle("黄色", 5);

        r.show();
        c.show();

        Shape s = new Rectangle("紫色",6 ,9);
        s.getArea();
        s.setArea(s.getArea());

        Rectangle r1=(Rectangle) s;
        r1.setArea(r1.getArea());
    }
}
